<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>{$current['title']}-{$Think.CONFIG.title}</title>
    <meta name="keywords" content="{$Think.CONFIG.keywords}" />
    <meta name="description" content="{$Think.CONFIG.description}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <include file="Public/head" />
</head>
<body class="no-skin">
<include file="Public/header" />
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try{ace.settings.check('main-container' , 'fixed')}catch(e){}
    </script>
    <include file="Public/sidebar" />
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs" />
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set" />
                <!-- /section:settings.box -->

                <div class="row">
                    <div class="page-content">
						<div class="page-content-area">
							<div class="row">
								<div class="col-xs-12">
									<!-- PAGE CONTENT BEGINS -->

									<!--/span-->
									<!-- left menu ends -->
									<div class="row">
										<div class="col-md-6">
											<div class="well">
												<b>结算单总额</b>
												<div class="text-primary" style="font-size:32px;margin:5px 0">
													¥{$member_money['total_bills']}                <span class="text-muted" style="font-size:13px">
														总充值: <b class="text-warning">¥{$member_money['total_money']}</b>
													</span>
												</div>
												<div style="font-size:14px" class="text-muted">
													未提现: <b class="text-warning">¥{$member_money['income']}</b>,
													提现中: <b class="text-warning">¥{$member_money['income_cash']}</b>
													已打款: <b class="text-warning">¥{$member_money['income_play']}</b>
												</div>
											</div>
										</div>
										<div class="col-md-6">
											<div class="well">
												<b>未申请提现余额</b>
												<div class="text-primary" style="font-size:32px;margin:5px 0">
													¥{$member_money['income']}                <button  onclick="cash_apply()" type="button" class="cash_apply btn btn-sm btn-primary">申请提现</button>
													<a href="{:U('Withdraw/withdraw_requests')}" class="btn btn-sm btn-primary">提现记录</a>
												</div>
												<div style="font-size:14px;" class="text-muted">
													申请提现总额: <b class="text-warning">¥{$member_money['total_apply']}</b>,
													已打款: <b class="text-warning">¥{$member_money['income_cash']}</b>,
													待打款: <b class="text-warning">¥{$member_money['income_play']}</b>
												</div>
											</div>
										</div>
									</div>

									<ul class="nav nav-tabs">
										<li class="<if condition="$status eq '' || $status eq 'pending'">active</if>">
											<a href="{:U('mine',['status'=>'pending'])}">未提现</a>
										</li>
										<li class="<if condition="$status eq 'withdrawing'">active</if>">
											<a href="{:U('mine',['status'=>'withdrawing'])}">提现中</a>
										</li>
										<li class="<if condition="$status eq 'paid'">active</if>">
											<a href="{:U('mine',['status'=>'paid'])}">已打款</a>
										</li>
									</ul>

									<table class="table table-striped table-bordered table-hover responsive">
										<thead>
										<tr>
											<td>
												日期
											</td>
											<td>
												总笔数
											</td>
											<td class="text-center">
												充值金额
											</td>
											<td class="text-center">
												帐单金额
											</td>
											<td class="text-center">
												佣金比例
											</td>
											<td>
												状态
											</td>
										</tr>
										</thead>
										<tbody>
											<if condition="$count eq 0">
											<tr>
												<td class="text-center" colspan="100">没有记录</td>
											</tr>
											<else/>
											<volist name="data" id="vo">
											<tr>
												<td>{$vo.bills_date|date='Y-m-d' , ###}</td>
												<td>{$vo.num}</td>
												<td>￥{$vo.money}</td>
												<td>￥{$vo.income}</td>
												<td>{$vo.proportion}%</td>
												<td>
												<if condition="$status eq 'withdrawing'">
													<span class="hierarchy_default hierarchy_good">提现中</span>
												<elseif condition="$status eq 'paid'"/>
													<span class="hierarchy_default hierarchy_fine">已打款</span>
												<else/>
													<span class="hierarchy_default">未提现</span>
												</if></td>
											</tr>
											</volist>
											</if>
										</tbody>
									</table>
									<!-- PAGE CONTENT ENDS -->
								</div>
							</div><!-- /.page-content-area -->
							{$page}
						</div>
					</div><!-- /.row -->
				</div><!-- /.page-content -->
			</div>
		</div>
    </div><!-- /.main-content -->
    <include file="Public/footer" />
</div><!-- /.main-container -->
<include file="Public/footerjs" />
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/qwadmin/js/date-time/bootstrap-datepicker.js"></script>
<script>

function cash_apply(){
	$.post("{:U('cash_apply')}" , function(data){
		layer_open(data,1);
	},'json');

}
function cash_confirm(){
	$.post("{:U('cash_confirm')}", function(data){
		layer_open(data,0);
	},'json');
}
function layer_open(data,status){
	layer.open({
		title: data.title,
		content: data.msg,
		yes: function(index, layero){
			layer.close(index); 
		},
		end: function(){ 
			if(status == 1 && data.status==1){
				cash_confirm();
			}
		}
	});
}
</script>
</body>
</html>